package com.cyclecoder.demo.listener;

import com.cyclecoder.demo.event.SnowEvent;
import com.cyclecoder.demo.event.WeatherEvent;

public class SnowEventListener implements WeatherListener {
    @Override
    public void onWeather(WeatherEvent event) {
        if(event instanceof SnowEvent){
            System.out.println(((SnowEvent) event).getWeather());
        }
    }
}
